// JavaScript Document
		var xmlhttp;
		function createXMLHTTPRequest()
		{
			if(window.XMLHttpRequest)
			{
				return new XMLHttpRequest();
			}
			else if(window.ActiveXObject)
			{
				return new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		function ThemMoi()
		{
		//	alert("abc");
			$MucCha = document.getElementById("DanhMucCha").value;
			$MucCon1 = document.getElementById("DanhMucCon").value;
			$MucCon2 = document.getElementById("DanhMucCon1").value;
			var TenDanhMuc = document.getElementById('DanhMucDangChon').value;
			if(TenDanhMuc !='')
			{
			//$abc = $MucCha + $MucCon1 +$MucCon2 +TenDanhMuc;
			//alert($abc);
			if($MucCon1 !='MucCon1')
			{
					
				var url="Them.php?MucCon1=" + $MucCon1 + "&TenDanhMuc=" + TenDanhMuc ;
			}
			else
			{
				if($MucCha !='MucCha')
				{
					
					var url="ThemCon.php?MucCha=" + $MucCha +   "&TenDanhMuc=" + TenDanhMuc ;
				}
				else
				{
						
						var url="ThemCha.php?TenDanhMuc=" + TenDanhMuc ;
				}
			}
			xmlhttp=createXMLHTTPRequest();
			if($MucCon1 !='MucCon1')
			{
				alert("them moi thang chau");
				xmlhttp.onreadystatechange=ThemDanhMucChau;
			}
			else
			{
				if($MucCha !='MucCha')
				{
					alert("them moi thang con");
					xmlhttp.onreadystatechange=ThemDanhMucCon;
				}
				else
				{
					alert("Them moi thang cha");
					xmlhttp.onreadystatechange=ThemDanhMucCha;
				}
			}
			xmlhttp.open("get",url,true);
			xmlhttp.send(null);	
			}
			else
			{
				alert("Vui long nhap danh muc can them !");
			}
		}
		
		function ThemDanhMucChau()
		{
			if(xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				var div=document.getElementById("DanhMucConCap1");
			//	var div=document.getElementById("HienThi");
				div.innerHTML=xmlhttp.responseText;
				
			}
		}
		function ThemDanhMucCon()
		{
			if(xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				var div=document.getElementById("HienThi");
				div.innerHTML=xmlhttp.responseText;
				
			}
		}
		function ThemDanhMucCha()
		{
			if(xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				var div=document.getElementById("DanhMucCha");
				div.innerHTML=xmlhttp.responseText;
			}
		}